jQuery(document).ready(function($) {
    var is_bouncy_nav_animating = false;
    //弹出菜单
    $('.cd-bouncy-nav-trigger').on('click', function() {
        triggerBouncyNav(true);
    });
    //关闭菜单
    $('.cd-bouncy-nav-modal .cd-close').on('click', function() {
        triggerBouncyNav(false);
    });
    $('.cd-bouncy-nav-modal').on('click', function(event) {
        if ($(event.target).is('.cd-bouncy-nav-modal')) {
            triggerBouncyNav(false);
        }
    });
    function triggerBouncyNav($bool) {
        //点击若没有动画
        if (!is_bouncy_nav_animating) {
            is_bouncy_nav_animating = true;
            //切换菜单动画
            $('.cd-bouncy-nav-modal').toggleClass('fade-in', $bool).toggleClass('fade-out', !$bool).find('li:last-child').one('webkitAnimationEnd oanimationend msAnimationEnd animationend', function() {
                $('.cd-bouncy-nav-modal').toggleClass('is-visible', $bool);
                if (!$bool)
                    $('.cd-bouncy-nav-modal').removeClass('fade-out');
                is_bouncy_nav_animating = false;
            });
            //判断css 动画是否开启.. 
            if ($('.cd-bouncy-nav-trigger').parents('.no-csstransitions').length > 0) {
                $('.cd-bouncy-nav-modal').toggleClass('is-visible', $bool);
                is_bouncy_nav_animating = false;
            }
        }
    }
});



$(function(){
	$(".showy a").hover(function(){
		$(this).find(".sidebox").stop().delay(500).animate({"width":"185px"},200).css({"opacity":"1","filter":"Alpha(opacity=100)"})	
		$(this).find(".sidebox1").stop().delay(500).animate({"width":"145px"},200).css({"opacity":"1","filter":"Alpha(opacity=100)"})	
	},function(){
		$(this).find(".sidebox").stop().animate({"width":"49px"},200).css({"opacity":"0.8","filter":"Alpha(opacity=80)"})	
		$(this).find(".sidebox1").stop().animate({"width":"49px"},200).css({"opacity":"0.8","filter":"Alpha(opacity=80)"})	
	});
	
});
	
function goTop(){
	$('html,body').animate({'scrollTop':0},600); //滚回顶部的时间，越小滚的速度越快~
}


$(window).resize(function(){
		if($(window).width()<700 && $(window).width()>=0)
		   {
			   $(".phoneone").css({width:$(window).width(),height:320})
			   
				$(".zhitwo_list_img,.zhitwo_list_img_1,.zhitwo_list_img_1 img,.zhitwo_list_img_2,.zhitwo_list_img_2 img").css({width:$(window).width()*0.196,height:$(window).width()*0.196/138*138})
				$(".zhifour_left_right").css({width:$(window).width()*0.98-75})
				
				$(".grid,.grid figure,.phoneeight_list ul li,.grid_1,.grid_1 img").css({width:$(window).width()*0.5,height:$(window).width()*0.5/280*177})
				$(".grid").css({"max-width":$(window).width()/280*177})
				
				
	
			   }
		if($(window).width()<1000 && $(window).width()>=700)
		   {
			   $(".phoneone").css({width:$(window).width(),height:400})
			    
				$(".zhitwo_list_img,.zhitwo_list_img_1,.zhitwo_list_img_1 img,.zhitwo_list_img_2,.zhitwo_list_img_2 img").css({width:$(window).width()*0.1,height:$(window).width()*0.1/138*138})
				$(".zhifour_left_right").css({width:$(window).width()*0.98-75})
				
				$(".grid,.grid figure,.phoneeight_list ul li,.grid_1,.grid_1 img").css({width:$(window).width()*0.3333,height:$(window).width()*0.3333/280*177})
				$(".grid").css({"max-width":$(window).width()/280*177})
				
			   }
		if($(window).width()<1200 && $(window).width()>=1000)
		   {
			   $(".phoneone").css({width:$(window).width(),height:$(window).width()/1920*729})
			   
				$(".zhitwo_list_img,.zhitwo_list_img_1,.zhitwo_list_img_1 img,.zhitwo_list_img_2,.zhitwo_list_img_2 img").css({width:$(window).width()*0.1,height:$(window).width()*0.1/138*138})
				
			   }
		if($(window).width()<1366 && $(window).width()>=1200)
		   {
			   $(".phoneone").css({width:$(window).width(),height:$(window).width()/1920*729})
			  
			   $(".zhitwo_list_img,.zhitwo_list_img_1,.zhitwo_list_img_1 img,.zhitwo_list_img_2,.zhitwo_list_img_2 img").css({width:138,height:138})
			   $(".zhifour_left_right").css({width:690})
			   
			   }
		if($(window).width()<1440 && $(window).width()>=1366)
		{
			$(".phoneone").css({width:$(window).width(),height:$(window).width()/1920*729})
			  
			   $(".zhitwo_list_img,.zhitwo_list_img_1,.zhitwo_list_img_1 img,.zhitwo_list_img_2,.zhitwo_list_img_2 img").css({width:138,height:138})
			   $(".zhifour_left_right").css({width:720})
			   $(".grid,.grid figure,.phoneeight_list ul li,.grid_1,.grid_1 img").css({width:429,height:272})
				$(".grid").css({"max-width":429})
			  
			}
		if($(window).width()<1600 && $(window).width()>=1440)
		{
			$(".phoneone").css({width:$(window).width(),height:$(window).width()/1920*729})
			  
			   $(".zhitwo_list_img,.zhitwo_list_img_1,.zhitwo_list_img_1 img,.zhitwo_list_img_2,.zhitwo_list_img_2 img").css({width:138,height:138})
			   $(".zhifour_left_right").css({width:720})
			   $(".grid,.grid figure,.phoneeight_list ul li,.grid_1,.grid_1 img").css({width:429,height:272})
				$(".grid").css({"max-width":429})
			  
			}
		if($(window).width()<1910 && $(window).width()>=1600)
		{
			$(".phoneone").css({width:$(window).width(),height:$(window).width()/1920*729})
			  
			   $(".zhitwo_list_img,.zhitwo_list_img_1,.zhitwo_list_img_1 img,.zhitwo_list_img_2,.zhitwo_list_img_2 img").css({width:138,height:138})
			   $(".zhifour_left_right").css({width:720})
			   $(".grid,.grid figure,.phoneeight_list ul li,.grid_1,.grid_1 img").css({width:515,height:326})
				$(".grid").css({"max-width":515})
			  
			}
		if($(window).width()>=1900)
		{
			$(".phoneone").css({width:$(window).width(),height:$(window).width()/1920*729})
			  
			   $(".zhitwo_list_img,.zhitwo_list_img_1,.zhitwo_list_img_1 img,.zhitwo_list_img_2,.zhitwo_list_img_2 img").css({width:138,height:138})
			   $(".zhifour_left_right").css({width:720})
			   $(".grid,.grid figure,.phoneeight_list ul li,.grid_1,.grid_1 img").css({width:515,height:326})
				$(".grid").css({"max-width":515})
			  
			}
		  })
		 
		  
			
$(function(){
		if($(window).width()<700 && $(window).width()>=0)
		   {
			   $(".phoneone").css({width:$(window).width(),height:320})
				$(".zhitwo_list_img,.zhitwo_list_img_1,.zhitwo_list_img_1 img,.zhitwo_list_img_2,.zhitwo_list_img_2 img").css({width:$(window).width()*0.196,height:$(window).width()*0.196/138*138})
				$(".zhifour_left_right").css({width:$(window).width()*0.98-75})
		
				$(".grid,.grid figure,.phoneeight_list ul li,.grid_1,.grid_1 img").css({width:$(window).width()*0.5,height:$(window).width()*0.5/280*177})
				$(".grid").css({"max-width":$(window).width()/280*177})
				
				
	
			   }
		if($(window).width()<1000 && $(window).width()>=700)
		   {
			   $(".phoneone").css({width:$(window).width(),height:400})
			   
				$(".zhitwo_list_img,.zhitwo_list_img_1,.zhitwo_list_img_1 img,.zhitwo_list_img_2,.zhitwo_list_img_2 img").css({width:$(window).width()*0.1,height:$(window).width()*0.1/138*138})
				$(".zhifour_left_right").css({width:$(window).width()*0.98-75})
				
				$(".grid,.grid figure,.phoneeight_list ul li,.grid_1,.grid_1 img").css({width:$(window).width()*0.3333,height:$(window).width()*0.3333/280*177})
				$(".grid").css({"max-width":$(window).width()/280*177})
				
			   }
		if($(window).width()<1200 && $(window).width()>=1000)
		   {
			   $(".phoneone").css({width:$(window).width(),height:$(window).width()/1920*729})
			   
				$(".zhitwo_list_img,.zhitwo_list_img_1,.zhitwo_list_img_1 img,.zhitwo_list_img_2,.zhitwo_list_img_2 img").css({width:$(window).width()*0.1,height:$(window).width()*0.1/138*138})
				$(".zhifour_left_right").css({width:$(window).width()*0.98-75})
				
			   }
		if($(window).width()<1366 && $(window).width()>=1200)
		   {
			   $(".phoneone").css({width:$(window).width(),height:$(window).width()/1920*729})
			   
			  
			   $(".zhitwo_list_img,.zhitwo_list_img_1,.zhitwo_list_img_1 img,.zhitwo_list_img_2,.zhitwo_list_img_2 img").css({width:138,height:138})
			   $(".zhifour_left_right").css({width:690})
			  
			   }
		if($(window).width()<1440 && $(window).width()>=1366)
		{
			$(".phoneone").css({width:$(window).width(),height:$(window).width()/1920*729})
			  
			   $(".zhitwo_list_img,.zhitwo_list_img_1,.zhitwo_list_img_1 img,.zhitwo_list_img_2,.zhitwo_list_img_2 img").css({width:138,height:138})
			   $(".zhifour_left_right").css({width:720})
			   $(".grid,.grid figure,.phoneeight_list ul li,.grid_1,.grid_1 img").css({width:429,height:272})
				$(".grid").css({"max-width":429})
			  
			}
		if($(window).width()<1600 && $(window).width()>=1440)
		{
			$(".phoneone").css({width:$(window).width(),height:$(window).width()/1920*729})
			  
			   $(".zhitwo_list_img,.zhitwo_list_img_1,.zhitwo_list_img_1 img,.zhitwo_list_img_2,.zhitwo_list_img_2 img").css({width:138,height:138})
			   $(".zhifour_left_right").css({width:720})
			   $(".grid,.grid figure,.phoneeight_list ul li,.grid_1,.grid_1 img").css({width:429,height:272})
				$(".grid").css({"max-width":429})
			  
			}
		if($(window).width()<1910 && $(window).width()>=1600)
		{
			$(".phoneone").css({width:$(window).width(),height:$(window).width()/1920*729})
			  
			   $(".zhitwo_list_img,.zhitwo_list_img_1,.zhitwo_list_img_1 img,.zhitwo_list_img_2,.zhitwo_list_img_2 img").css({width:138,height:138})
			   $(".zhifour_left_right").css({width:720})
			   $(".grid,.grid figure,.phoneeight_list ul li,.grid_1,.grid_1 img").css({width:515,height:326})
				$(".grid").css({"max-width":515})
			  
			}
		if($(window).width()>=1900)
		{
			$(".phoneone").css({width:$(window).width(),height:$(window).width()/1920*729})
			  
			   $(".zhitwo_list_img,.zhitwo_list_img_1,.zhitwo_list_img_1 img,.zhitwo_list_img_2,.zhitwo_list_img_2 img").css({width:138,height:138})
			   $(".zhifour_left_right").css({width:720})
			   $(".grid,.grid figure,.phoneeight_list ul li,.grid_1,.grid_1 img").css({width:515,height:326})
				$(".grid").css({"max-width":515})
			  
			}
})



$(function(){
	if($(window).width()>1440){
		$(window).scroll(function(){
			var s=$(window).scrollTop();
		
			if( s>300&& s<600){
				$('.zhitwo').find('.zhitwo_tit').animate({
					top:"0",
					opacity:1
				},300,function(){
					$('.zhitwo').find('.zhitwo_con').animate({
						top:"0",
						opacity:1
					},300,function(){
						$('.zhitwo').find('.zhitwo_tit').animate({
						top:"0",
						opacity:1
						})
					})
					$.each($('.zhitwo .zhitwo_list ul li'),function(i,n){
						$('.zhitwo .zhitwo_list ul li').eq(i).delay(300*i).animate({
							bottom:0,
							opacity:1
						},300)
					})
				})	
				
			}else if(s>700&& s<1200){
				$('.zhithree').find('.zhithree_left').animate({
					left:"0",
					opacity:1
				},300,function(){
					$('.zhithree').find('.zhithree_right').animate({
						right:"0",
						opacity:1
					})
				});
			}else if(s>1500&& s<2000){
			
						$('.zhifour').find('.zhifour_left ul li').eq(0).animate({
								left:0,
								opacity:1
							},300,function(){
								$('.zhifour').find('.zhifour_left ul li').eq(1).animate({
									left:0,
									opacity:1
								},300,function(){
									$('.zhifour').find('.zhifour_left ul li').eq(2).animate({
									left:0,
									opacity:1
									})
								})
							
					});	
					$('.zhifour').find('.zhifour_right').animate({
						right:"0",
						opacity:1
					},300)	
			}
		});
	}else if($(window).width()<1440 && $(window).width()>=1200){
		$(window).scroll(function(){
			var s=$(window).scrollTop();
		
			if( s>300&& s<600){
				$('.zhitwo').find('.zhitwo_tit').animate({
					top:"0",
					opacity:1
				},300,function(){
					$('.zhitwo').find('.zhitwo_con').animate({
						top:"0",
						opacity:1
					},300,function(){
						$('.zhitwo').find('.zhitwo_tit').animate({
						top:"0",
						opacity:1
						})
					})
					$.each($('.zhitwo .zhitwo_list ul li'),function(i,n){
						$('.zhitwo .zhitwo_list ul li').eq(i).delay(300*i).animate({
							bottom:0,
							opacity:1
						},300)
					})
				})	
				
			}else if(s>700&& s<1200){
				$('.zhithree').find('.zhithree_left').animate({
					left:"0",
					opacity:1
				},300,function(){
					$('.zhithree').find('.zhithree_right').animate({
						right:"0",
						opacity:1
					})
				});
			}else if(s>1500&& s<2000){
			
						$('.zhifour').find('.zhifour_left ul li').eq(0).animate({
								left:0,
								opacity:1
							},300,function(){
								$('.zhifour').find('.zhifour_left ul li').eq(1).animate({
									left:0,
									opacity:1
								},300,function(){
									$('.zhifour').find('.zhifour_left ul li').eq(2).animate({
									left:0,
									opacity:1
									})
								})
							
					});	
					$('.zhifour').find('.zhifour_right').animate({
						right:"0",
						opacity:1
					},300)	
			}
		});
		}else if($(window).width()<1200 && $(window).width()>=1000){
		$(window).scroll(function(){
			var s=$(window).scrollTop();
		
			if( s>300&& s<600){
				$('.zhitwo').find('.zhitwo_tit').animate({
					top:"0",
					opacity:1
				},300,function(){
					$('.zhitwo').find('.zhitwo_con').animate({
						top:"0",
						opacity:1
					},300,function(){
						$('.zhitwo').find('.zhitwo_tit').animate({
						top:"0",
						opacity:1
						})
					})
					$.each($('.zhitwo .zhitwo_list ul li'),function(i,n){
						$('.zhitwo .zhitwo_list ul li').eq(i).delay(300*i).animate({
							bottom:0,
							opacity:1
						},300)
					})
				})	
				
			}else if(s>700&& s<1200){
				$('.zhithree').find('.zhithree_left').animate({
					left:"0",
					opacity:1
				},300,function(){
					$('.zhithree').find('.zhithree_right').animate({
						right:"0",
						opacity:1
					})
				});
			}else if(s>1500&& s<2000){
			
						$('.zhifour').find('.zhifour_left ul li').eq(0).animate({
								left:0,
								opacity:1
							},300,function(){
								$('.zhifour').find('.zhifour_left ul li').eq(1).animate({
									left:0,
									opacity:1
								},300,function(){
									$('.zhifour').find('.zhifour_left ul li').eq(2).animate({
									left:0,
									opacity:1
									})
								})
							
					});	
					$('.zhifour').find('.zhifour_right').animate({
						right:"0",
						opacity:1
					},300)	
			}
		});
		}
	
})